<?php if ($this->list) { ?>
<?php foreach ($this->list AS $key => $val) { ?>
<li>
	
	<div class="mod-head">
		<?php if ($val['last_action_str']) { ?>
			<?php echo $val['last_action_str']; ?>
		<?php } ?>
		
		<?php if (!$_GET['filter'] == 'focus') { ?>
		<a href="m/people/<?php echo $val['user_info']['user_name']?>">
			<?php if ($val['question_info']['anonymous'] == 0 OR !$val['question_info']) { ?>
				<img class="img" width="20" src="<?php echo get_avatar_url($val['user_info']['uid'], 'max'); ?>" />
			<?php } else { ?>
				<img class="img" width="20" src="<?php echo G_STATIC_URL; ?>/common/avatar-max-img.png" />
			<?php } ?>
		</a>
		<?php } ?>
	</div>
	<div class="mod-body">
		<h2>
			<a href="<?php echo $val['link']; ?>"><?php echo $val['title']; ?></a>
		</h2>
		<?php if ($val['associate_action'] == ACTION_LOG::ANSWER_QUESTION OR $val['associate_action'] == ACTION_LOG::ADD_AGREE) { ?>
		<div class="content">
			<?php echo nl2br($val['answer_info']['answer_content']); ?>
		</div>
		<?php } ?>
	</div>
	<div class="mod-footer">
		<?php if ($val['associate_action'] == ACTION_LOG::ANSWER_QUESTION OR $val['associate_action'] == ACTION_LOG::ADD_AGREE) { ?>
		<a class="answer_vote agree<?php if ($val['answer_info']['agree_status'] == 1) { ?> active<?php } ?>" <?php if ($this->user_id != $val['answer_info']['uid']) { ?>onclick="AWS.User.agree_vote($(this), <?php echo $val['answer_info']['answer_id']; ?>)"<?php } ?>>
			<i class="icon icon-agree"></i>
			<b><?php echo $val['answer_info']['agree_count']; ?></b>
		</a>
		<a class="answer_vote disagree<?php if ($val['answer_info']['agree_status'] == -1) { ?> active<?php } ?>" <?php if ($this->user_id != $val['answer_info']['uid']) { ?>onclick="AWS.User.disagree_vote($(this), <?php echo $val['answer_info']['answer_id']; ?>)"<?php } ?>>
			<i class="icon icon-disagree"></i>
		</a> 
		<?php } else if (isset($val['article_info']['comments'])) { ?>
			<a href="m/article/<?php echo $val['article_info']['id']; ?>"><i class="icon icon-reply"></i> <?php if ($val['article_info']['comments'] == 0) { ?> <?php _e('添加回复'); ?> <?php } else { ?><?php echo $val['article_info']['comments']; ?><?php } ?></a>

		<?php } else if ($_GET['filter'] == 'focus') { ?>
			<a onclick="AWS.ajax_request(G_BASE_URL + '/question/ajax/focus/question_id-<?php echo $val['question_info']['question_id']; ?>');"><?php _e('取消关注'); ?></a>
		<?php } else { ?>
			<a href="<?php echo $val['link']; ?>"><i class="icon icon-replay"></i> <?php if ($val['question_info']['answer_count'] == 0) { ?> <?php _e('添加回复'); ?> <?php } else { ?><?php echo $val['question_info']['answer_count']; ?><?php } ?></a>
		<?php } ?>
		
		<?php if ($_GET['filter'] == 'focus') { ?>
			<span class="color-999 pull-right">
				<i class="icon icon-replay"></i>
				<?php echo $val['question_info']['answer_count']; ?>
			</span>
		<?php } else { ?>
		<span class="color-999 pull-right"><?php echo date_friendly($val['add_time'], 604800, 'Y-m-d'); ?></span>
		<?php } ?>
	</div>
</li>
<?php } ?>
<?php } ?>